/*
 Navicat Premium Data Transfer

 Source Server         : mysql
 Source Server Type    : MySQL
 Source Server Version : 50727
 Source Host           : localhost:3306
 Source Schema         : admin-suermarket

 Target Server Type    : MySQL
 Target Server Version : 50727
 File Encoding         : 65001

 Date: 31/10/2022 11:25:06
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for customer_bill
-- ----------------------------
DROP TABLE IF EXISTS `customer_bill`;
CREATE TABLE `customer_bill` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `goods_id` int(11) DEFAULT NULL COMMENT '入库商品id',
  `name` varchar(128) DEFAULT NULL COMMENT '商品的名称',
  `num` int(11) DEFAULT NULL COMMENT '商品的数量',
  `purchase_price` decimal(10,2) DEFAULT NULL COMMENT '商品的进价',
  `pay_type` varchar(12) DEFAULT NULL COMMENT '支付方式 现金支付cash_pay、微信支付 wx_pay、支付宝支付ali_pay、银行卡支付bank_pay',
  `status` varchar(12) DEFAULT NULL COMMENT '订单的状态\n未支付 unpaid\n已支付 payment',
  `create_date` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_date` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of customer_bill
-- ----------------------------
BEGIN;
INSERT INTO `customer_bill` VALUES (1, 1, 'iphone7', 12, 1800.00, 'wx_pay', 'payment', '2022-10-28 11:59:16', '2022-10-28 11:59:16');
INSERT INTO `customer_bill` VALUES (2, 1, 'iphone7', 10, 1800.00, 'wx_pay', 'payment', '2022-10-28 12:01:28', '2022-10-28 12:01:28');
INSERT INTO `customer_bill` VALUES (3, 6, 'iPhone13Pro', 20, 4000.00, 'wx_pay', 'payment', '2022-10-28 12:01:56', '2022-10-28 12:01:56');
COMMIT;

-- ----------------------------
-- Table structure for goods
-- ----------------------------
DROP TABLE IF EXISTS `goods`;
CREATE TABLE `goods` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(128) DEFAULT NULL COMMENT '商品的名称',
  `img_url` varchar(255) DEFAULT 'https://s1.ax1x.com/2022/07/25/jx9ehV.png',
  `market_price` decimal(10,2) DEFAULT NULL COMMENT '市场价格',
  `price` decimal(10,2) DEFAULT NULL COMMENT '销售价格',
  `purchase_price` decimal(10,2) DEFAULT NULL COMMENT '商品进价',
  `num` int(11) DEFAULT NULL COMMENT '数量',
  `status` varchar(12) DEFAULT NULL COMMENT 'active上架 unactive下架',
  `make` varchar(255) DEFAULT NULL COMMENT '商品的描述',
  `pushDate` datetime DEFAULT NULL,
  `offDate` datetime DEFAULT NULL,
  `createDate` datetime DEFAULT CURRENT_TIMESTAMP,
  `updateData` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=18 DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of goods
-- ----------------------------
BEGIN;
INSERT INTO `goods` VALUES (1, 'iphone7', 'https://s1.ax1x.com/2022/07/25/jx9ehV.png', 2599.00, 2300.00, 1800.00, 140, 'unactive', '这个手机真不错', NULL, NULL, '2022-10-25 09:46:36', '2022-10-28 12:01:28');
INSERT INTO `goods` VALUES (6, 'iPhone13Pro', 'https://s1.ax1x.com/2022/07/25/jx9ehV.png', 7999.00, 6999.00, 4000.00, 220, 'active', '必须要加', NULL, NULL, '2022-10-25 17:06:05', '2022-10-28 12:01:56');
INSERT INTO `goods` VALUES (14, '1', 'https://s1.ax1x.com/2022/07/25/jx9ehV.png', 1.00, 1.00, 1.00, 1, 'unactive', '1', NULL, NULL, '2022-10-31 09:34:14', '2022-10-31 09:34:14');
INSERT INTO `goods` VALUES (15, '2', 'https://s1.ax1x.com/2022/07/25/jx9ehV.png', 2.00, 2.00, 2.00, 2, 'unactive', '2', NULL, NULL, '2022-10-31 09:34:21', '2022-10-31 09:34:21');
INSERT INTO `goods` VALUES (16, '3', 'https://s1.ax1x.com/2022/07/25/jx9ehV.png', 3.00, 3.00, 3.00, 3, 'unactive', '3', NULL, NULL, '2022-10-31 09:34:28', '2022-10-31 09:34:28');
INSERT INTO `goods` VALUES (17, '4', 'https://s1.ax1x.com/2022/07/25/jx9ehV.png', 4.00, 4.00, 4.00, 4, 'unactive', '4', NULL, NULL, '2022-10-31 09:34:38', '2022-10-31 09:34:38');
COMMIT;

SET FOREIGN_KEY_CHECKS = 1;
